<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"><head>
    <meta charset="UTF-8">
    <title>查询页面</title>
</head>

<body>
<form action="/selExcel" th:action="@{/selExcel}" method="post">
昵称查询:<input type="text" name="nickname">
城市类别:<select name="city">
            <option></option>
            <option th:each="c:${citys}" th:value="${c}" th:text="${c}"></option>
        </select>
省份类别:<select name="province">
            <option></option>
            <option th:each="p:${provinces}" th:value="${p}" th:text="${p}"></option>
        </select>
国家类别:<select name="country">
            <option></option>
            <option th:each="co:${countrys}" th:value="${co}" th:text="${co}"></option>
        </select>

性别类别:<select name="sex">
            <option></option>
            <option value="1" >男</option>
            <option value="0" >女</option>
            <option value="2" >无</option>
        </select>

状态类别:<select name="subscribe">
            <option></option>
            <option value="1" >状态码为1</option>
            <option value="0" >状态码为0</option>
        </select><br>
    <input type="submit" value="提交">

</form>
<table border="1">
    <tr>
        <th>编号</th>
        <th>eid</th>
        <th>openid</th>
        <th>昵称</th>
        <th>性别</th>
        <th>城市</th>
        <th>国家</th>
        <th>省份</th>
        <th>头像地址</th>
        <th>状态</th>
        <th>语言</th>
        <th>备注</th>
    </tr>


    <tr th:each="p:${pageInfo.list }" >
        <td th:text="${p.id}"></td>
        <td th:text="${p.eid }"></td>
        <td th:text="${p.openid }"></td>
        <td th:text="${p.nickname }"></td>
        <td th:if="${p.sex==1}">
            男
        </td>
        <td th:if="${p.sex==0}">
            女
        </td>
        <td th:if="${p.sex==2}">
            无
        </td>
        <td th:text="${p.city }"></td>
        <td th:text="${p.country }"></td>
        <td th:text="${p.province }"></td>
        <td th:text="${p.headimgurl }"></td>
        <td th:text="${p.subscribe }"></td>
        <td th:text="${p.language }"></td>
        <td th:text="${p.remark }"></td>

    </tr>



</table>
总共<span th:text="${pageInfo.total}"></span>记录，总共<span th:text="${pageInfo.pages}"></span>页
<span th:if="${pageInfo.hasPreviousPage==true}">
          <a href="/selExcel?pageNum" th:href="@{|/selExcel?pageNum=${pageInfo.prePage}|}">上一页</a>
     </span>
<span th:if="${pageInfo.hasPreviousPage==false}">
         <a href="/selExcel?pageNum" th:href="@{|/selExcel?pageNum=${pageInfo.navigateLastPage}|}">上一页</a>
     </span>

<a href="selExcel?pageNum=1">第一页</a><a href="selExcel?pageNum=2">第二页</a><a href="selExcel?pageNum=3">第三页</a>


<span th:if="${pageInfo.hasNextPage==true}">
          <a href="/selExcel?pageNum=" th:href="@{|/selExcel?pageNum=${pageInfo.nextPage}|}">下一页</a>
     </span>
<span th:if="${pageInfo.hasNextPage==false}">
         <a href="/selExcel?pageNum=" th:href="@{|/selExcel?pageNum=${pageInfo.navigateFirstPage}|}">下一页</a>
     </span>
<a href="/tomain" th:href="@{/tomain}">返回主页面</a>
</body>
</html>